package com.heima.day526_数组;

import java.util.Scanner;

public class Qsum {
    public static void main(String[] args) {

        int sum = 0;
        int[] arr = new int[5];
        Scanner sc = new Scanner(System.in);
        for (int i = 0; i < arr.length; i++) {
            System.out.println("请输入第 " + (i + 1) + " 个数");
            int num = sc.nextInt();
            arr[i] = num;
        }
        for (int i = 0; i < arr.length; i++) {
            sum += arr[i];
        }
        System.out.println("输入的5个数之和为： " + sum);


    }
}
